package com.wkbb.basic.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.enums.TypeSetEnum;
import com.wkbb.common.handler.JsonUtil;
import com.wkbb.common.utils.BeanUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 组织信息表
 * b_organization
 *
 * @author Lxc
 * @date 2019-07-01 13:57:32
 */
@Data
@ApiModel("教育机构")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Agent implements Serializable {
    @ApiModelProperty(value = "编号")
    private Long id;
    @ApiModelProperty(value = "")
    private Long orgId;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "联系人手机号")
    private String contactPhone;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "联系人姓名")
    private String contactName;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "组织名称")
    private String name;
    @ApiModelProperty(value = "LOGO")
    private String logoImg;
    @NotNull(message = "参数缺失")
    @ApiModelProperty(value = "省份ID")
    private Integer provinceId;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "省份")
    private String province;
    @NotNull(message = "参数缺失")
    @ApiModelProperty(value = "城市ID")
    private Integer cityId;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "城市")
    private String city;
    @NotNull(message = "参数缺失")
    @ApiModelProperty(value = "区域ID")
    private Integer areaId;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "区域")
    private String area;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "地址")
    private String address;
    @ApiModelProperty(value = "创建人")
    private String createBy;


    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "账号")
    private String account;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "密码")
    private String password;

    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "机构编码")
    private String organizationCode;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "联系人邮箱")
    private String contactEmail;
    @ApiModelProperty("机构介绍")
    private String introduce;
    @NotNull(message = "参数缺失")
    @ApiModelProperty(value = "服务省份ID")
    private Integer serviceProvinceId;
    @NotNull(message = "参数缺失")
    @ApiModelProperty(value = "服务城市ID")
    private Integer serviceCityId;
    @NotBlank(message = "参数缺失")
    @ApiModelProperty(value = "服务区域ID列表多个,分隔")
    private String serviceAreaIds;


    @ApiModelProperty(value = "服务区域列表多个,分隔")
    private String serviceAreas;
    @ApiModelProperty(value = "教师数量")
    private Integer teacherCount;
    @ApiModelProperty(value = "课程数量")
    private Integer courseCount;

    public static void main(String[] args) {
//        Agent data = new Agent();
//        data.setName("因时测试机构");
//        data.setContactPhone("13148861314");
//        data.setContactEmail("email@qq.com");
//        data.setContactName("联系人");
//        data.setName("圣诞节弗兰克");
//        data.setProvinceId(19);
//        data.setCityId(1607);
//        data.setAreaId(3638);
//        data.setProvince("广东");
//        data.setCity("深圳市");
//        data.setArea("罗湖区");
//        data.setAddress("罗湖111111号");
//        data.setIntroduce("简介简介");
//
//        data.setAccount("test1234");
//        data.setPassword("123456");
//        data.setOrganizationCode("A1234");
//        data.setServiceProvinceId(19);
//        data.setServiceCityId(1607);
//        data.setServiceAreaIds("3638,3639");
//        System.out.println(JsonUtil.objectToJson(data));


        String raw = "02010612ff0014dfe620220811006401090049000000080959532d000000001106000045534957504c410000000153000000000000000000000000000000";
        String countStr = raw.substring(30, 32) + raw.substring(32, 34);
        System.out.println(Integer.valueOf(countStr, 16));

    }
}
